From c5924cf2725fa93250ce7a4b77cfb307af8d2ea6 Mon Sep 17 00:00:00 2001 From: "dan@guaranine.beaverton.ibm.com" Date: Wed, 30 Nov 2005 11:44:19 +0000 Subject: [PATCH] Some tweaks to the restore and migrate tests to expose the consoles of the restored DomUs, since they currently Oops on x86_64. --- .../tests/migrate/01_migrate_localhost_pos.py | 15 +++++++++------ .../xm-test/tests/restore/01_restore_basic_pos.py | 11 ++++++++--- .../tests/restore/04_restore_withdevices_pos.py | 5 +++++ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/tools/xm-test/tests/migrate/01_migrate_localhost_pos.py b/tools/xm-test/tests/migrate/01_migrate_localhost_pos.py index af45e092ea..4895e9c719 100644 --- a/tools/xm-test/tests/migrate/01_migrate_localhost_pos.py +++ b/tools/xm-test/tests/migrate/01_migrate_localhost_pos.py @@ -38,8 +38,8 @@ except ConsoleError, e: try: # Activate the console console.sendInput("foo") - # Make sure a command succeeds - run = console.runCmd("ls /bin") + # Set a variable to check on the other side + run = console.runCmd("foo=bar") except ConsoleError, e: FAIL(str(e)) @@ -66,18 +66,21 @@ if (old_domid == new_domid): # Attach a console to it try: console = XmConsole(domain.getName(), historySaveCmds=True) + console.debugMe = True except ConsoleError, e: pass +console.sendInput("ls") + # Run 'ls' try: # Check the dmesg output on the domU - run = console.runCmd("ls /bin") + run = console.runCmd("echo xx$foo") except ConsoleError, e: FAIL(str(e)) - -if not re.search("chmod", run["output"]): - FAIL("invalid console output from ls after migration") + +if not re.search("bar", run["output"]): + FAIL("Migrated domain has been reset") # Close the console console.closeConsole() diff --git a/tools/xm-test/tests/restore/01_restore_basic_pos.py b/tools/xm-test/tests/restore/01_restore_basic_pos.py index df9c8018dd..8254148525 100644 --- a/tools/xm-test/tests/restore/01_restore_basic_pos.py +++ b/tools/xm-test/tests/restore/01_restore_basic_pos.py @@ -25,6 +25,8 @@ except DomainError, e: # Make sure the domain isn't DOA try: console = XmConsole(domain.getName()) + console.sendInput("input") + console.runCmd("foo=bar") except ConsoleError, e: FAIL(str(e)) @@ -63,9 +65,12 @@ if not isDomainRunning(domain.getName()): # Make sure it's alive try: newConsole = XmConsole(domain.getName()) - run = newConsole.runCmd("ls") - if run["return"] != 0: - FAIL("Unable to read from restored domain") + # Enable debug dumping because this generates a Oops on x86_64 + newConsole.debugMe = True + newConsole.sendInput("ls") + run = newConsole.runCmd("echo xx$foo") + if not re.search("bar", run["output"]): + FAIL("Restored domain has been reset") except ConsoleError, e: FAIL("Restored domain is dead (%s)" % str(e)) diff --git a/tools/xm-test/tests/restore/04_restore_withdevices_pos.py b/tools/xm-test/tests/restore/04_restore_withdevices_pos.py index 3c3d998b2f..0b82943142 100644 --- a/tools/xm-test/tests/restore/04_restore_withdevices_pos.py +++ b/tools/xm-test/tests/restore/04_restore_withdevices_pos.py @@ -90,6 +90,11 @@ if s != 0: try: console = XmConsole(domain.getName()) + # Enable debug dumping, as this causes an Oops on x86_64 + console.debugMe = True + + # In case the domain is rebooted + console.sendInput("ls") run = console.runCmd("ls | grep proc") if run["return"] != 0: -- 2.30.2